package com.zhuss.core.db.dao.ext;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.zhuss.bean.bo.core.permission.SearchPermissionBo;
import com.zhuss.bean.vo.core.permission.DetailPermissionVo;
import com.zhuss.bean.vo.core.permission.ListPermissionVo;
import com.zhuss.core.db.dao.gen.PermissionMapper;
import com.zhuss.core.db.entity.Permission;

@Mapper
public interface PermissionDao extends PermissionMapper {

	void create(Permission record);

	List<Permission> listAll(@Param("system") Integer system);

	List<ListPermissionVo> list(SearchPermissionBo bo);
	
	Integer countList(SearchPermissionBo bo);
	
	DetailPermissionVo detail(@Param("permissionId") Long permissionId);
	
	void delete(Permission record);
	
	List<Permission> listSon(@Param("permissionId") Long permissionId);

	Long listParent(@Param("permissionId") Long permissionId);
	
	List<Permission> listByName(@Param("name") String name);
    
}